package com.yjs.app.trade.core.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
import java.sql.Clob;
import java.sql.SQLException;

public class ClobUtil {
	public static String clobToString(Clob clob) throws SQLException, IOException{
		String reString="";
		Reader is=clob.getCharacterStream();
		BufferedReader br=new BufferedReader(is);
		String s=br.readLine();
		StringBuffer sb=new StringBuffer();
		while (s!=null){
			sb.append(s);
			s=br.readLine();
		}
		reString=sb.toString();
		if(br!=null){
			br.close();
		}
		if(is!=null){
			is.close();
		}
		return reString;
		
	}

}
